package com.zyp.abstractFactory;


/**
 * 
 * 抽象工厂
 * @author Administrator
 *
 */
public interface IFacotry {

	public ProductA produceA(); 
	
	public ProductB productB();
	
}

class Facotry1 implements IFacotry{

	@Override
	public ProductA produceA() {
		
		return new AProduct1();
	}

	@Override
	public ProductB productB() {
		return new BProduct1();
	}
	
}

class Facotry2 implements IFacotry{

	@Override
	public ProductA produceA() {
		
		return new AProduct2();
	}

	@Override
	public ProductB productB() {
		return new BProduct2();
	}
	
}




